#!/bin/bash

buildRoot=/build
installDstRoot=/usr/local

srcRoot=$buildRoot/src
buildTmpRoot=$buildRoot/tmp
pkgRoot=$buildRoot/pkg
scriptRoot=$buildRoot/script

$scriptRoot/pre_build.sh

mkdir -p $buildTmpRoot
cd $buildTmpRoot

tar zxvf $srcRoot/redis-4.0.8.tar.gz
cd redis-4.0.8
make
make PREFIX=/usr/local/redis-4.0.8 install

cd $installDstRoot
tar zcvf redis-4.0.8.tar.gz redis-4.0.8
cp redis-4.0.8.tar.gz $pkgRoot
